<!--#include("_tool_header.html")-->
<!--%import("css/pagination.css",optimized=false)-->

<!-- Content -->
<div id="content">
    <!-- contentHeader -->
    <div class="dashboardHeader">
        <h3 class="h3"><span class="icon attributes"></span>{$lang->shop_second_menus[1]['dispShopToolManageAttributes']}</h3>
    </div>
    <!-- /contentHeader -->
    <div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
        <p>{$XE_VALIDATOR_MESSAGE}</p>
    </div>
    <!-- contentNavigation -->
    <div class="contentNavigation">
        <ul class="sortDefault">
            <a href="{getUrl('act','dispShopToolAddAttribute')}">{$lang->add_new_attribute}</a>
        </ul>
    </div>
    <!-- /contentNavigation -->

    <!-- listHeader -->
    <div class="listHeader">
        <p class="info"> <!--@if($search)-->{sprintf($lang->search_result_count,$page_navigation->total_count)}<!--@else-->{sprintf($lang->total_result_count,$page_navigation->total_count)}<!--@end--></p>
        <fieldset class="search">
            <legend>{$lang->cmd_search}</legend>
            <form action="./">
                <input type="hidden" name="published" value="{$published}" />
                <input type="hidden" name="act" value="procShopToolFilterAttributes" />

                <input name="search_keyword" type="text" title="{$lang->cmd_search}" class="iText" value="{$search}"/>
                <span class="btnGray medium"><input type="submit" value="{$lang->cmd_search}" /></span>
            </form>
        </fieldset>
    </div>
    <!-- /listHeader -->

    <!-- Table Data -->
    <fieldset>
        <legend>{$lang->attribute_management}</legend>
        <form action="" method="post">
            <table border="1" cellspacing="0" summary="{$lang->content_list}" class="tableData">
                <thead>
                <tr>
                    <th scope="col">
                        <input type="checkbox" class="inputCheck" onclick="jQuery('input.boxlist').click()" />
                    </th>
                    <th scope="col">{$lang->id}</th>
                    <th scope="col" class="title">{$lang->name}</th>
                    <th scope="col">{$lang->type}</th>
                    <th scope="col">{$lang->required}</th>
                    <th scope="col">{$lang->status}</th>
                    <th scope="col">&nbsp;</th>
                    <th scope="col">&nbsp;</th>
                </tr>
                </thead>
                <tbody>

                <tr cond="empty($attributes_list)">
                    <td cond="!$search" class="noData" colspan="9"><p>{sprintf($lang->no_attribute, getUrl('', 'act', 'dispShopToolAddAttribute'))}</p></td>
                    <td cond="$search" class="noData" colspan="9"><p>{$lang->no_search_results}</p></td>
                </tr>
                <!--@foreach($attributes_list as $no => $attribute)-->
                <tr>
                    <td>
                        <input type="checkbox" name="attribute_srl" value="{$attribute->attribute_srl}" class="inputCheck boxlist" />
                    </td>
                    <td class="small">{$attribute->attribute_srl}</td>
                    <td class="title"><a href="{getUrl('act','dispShopToolEditAttribute','attribute_srl',$attribute->attribute_srl)}" class="attributeTitle">{$attribute->title}</a></td>
                    <td class="small">{$attribute->getType($lang)}</td>
                    <td class="small">{$attribute->required}</td>
                    <td class="small">{$attribute->status}</td>
                    <td>
                        <span class="btnGray small"><a href="{getUrl('act','dispShopToolEditAttribute','attribute_srl',$attribute->attribute_srl)}">{$lang->cmd_edit}</a></span>

                    </td>
                    <td>
                        <button type="button" class="btnTableData" onclick="deleteAttributeItem({$attribute->attribute_srl})"><span>{$lang->cmd_delete}</span></button>
                    </td>
                </tr>
                <!--@end-->

                </tbody>
            </table>

            <div class="listFooter" cond="!empty($attributes_list)">

                <!-- Change-->
                <div class="change">
                    <p class="p1">{$lang->selected_articles}</p>
                    <span class="btnGray large"><button type="button" onclick="deleteAttributeItems({$page})"><img src="img/buttonTableDataX.gif" width="7" height="7" alt="" class="icon" />{$lang->cmd_delete}</button></span>

                </div>
                <!-- /Change -->

                <!-- Pagination -->
                <div class="pagination">
                    <a href="{getUrl('page','','mid',$mid)}" class="prev"><span>{$lang->first_page}</span></a>

                    <!--@while($page_no = $page_navigation->getNextPage())-->
                    <!--@if($page == $page_no)-->
                    <strong>{$page_no}</strong>
                    <!--@else-->
                    <a href="{getUrl('page',$page_no,'mid',$mid)}">{$page_no}</a>
                    <!--@end-->
                    <!--@end-->

                    <a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="next"><span>{$lang->last_page}</span></a>
                </div>
                <!-- /Pagination -->

            </div>

        </form>
    </fieldset>
    <!-- /Table Data -->

</div>
<!-- /Content -->


<!-- Extension -->
<!--#include("_tool_menu.html")-->
<!-- Extension -->

<!--#include("_tool_footer.html")-->

<script type="text/javascript">
    if (!xe.lang) xe.lang = {};
    xe.lang.msg_confirm_delete_attribute = "{$lang->msg_confirm_delete_attribute}";
    xe.lang.msg_confirm_delete_attributes = '{$lang->msg_confirm_delete_attributes}';
</script>